<template>
  <div class="department" id="department">
    <!-- 右侧 -->
    <div class="department_right">
      <!-- 顶部导航栏 -->
      <div class="mechanism_nav">
        <!-- 左侧 -->
        <div class="mechanism_nav_left">
          <el-radio-group
            v-model="radio"
            size="small"
            @change="modelType($event)"
          >
            <el-radio-button label="待办"></el-radio-button>
            <el-radio-button label="已办"></el-radio-button>
            <!-- #2b5a9d -->
          </el-radio-group>
        </div>
        <!-- 顶部按钮 -->
        <div class="print">
          <div class="printTable">
            <el-button
              type="primary"
              icon="el-icon-refresh"
              size="small"
              @click="yj_searchForm(getList)"
            ></el-button>

            <el-button
              type="primary"
              icon="el-icon-edit"
              size="small"
              v-if="getList.modelType == '3' && yj_check == true"
              @click="edit('复核')"
            >
              复核
            </el-button>
            <el-button
              type="primary"
              icon="el-icon-circle-check"
              size="small"
              v-if="getList.modelType == '3' && yj_submit == true"
              @click="SubmitText(fId)"
            >
              提交
            </el-button>
          </div>
        </div>
      </div>

      <!-- 表格 -->
      <div class="text_table">
        <tableData
          :height="navigatepageNums > 1 ? 'calc(100% - 50px)' : '100%'"
          :config="table_config"
          :dataList="tableData"
          :loading="loading"
          @selection-change="selectionChange"
          @sort-change="sortChange"
          @click-change="rowChange"
          @ClickOnLine="yj_viewForm"
          :page="getList.page"
          :pageSize="getList.pageSize"
        />
        <pagination
          v-if="navigatepageNums > 1"
          :info="queryCriteriaData"
          :treelength="treelength"
          :total="queryCriteriaData.total"
          :pageNum.sync="getList.page"
          :limit.sync="getList.pageSize"
          @pagination="yj_searchForm(getList)"
        />
      </div>
      <!--弹框-->
      <div class="Control-1 mechanism_dialogS closure">
        <el-dialog
          :title="dialogTitle"
          :modal-append-to-body="false"
          v-dialogDrag
          :visible.sync="dialogEditVisible"
          v-loading="loadingEditDialog"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div
            class="dialogBody common"
            :style="{ height: '650px' }"
            style="overflow: hidden"
          >
            <div style="overflow-y: auto; margin-bottom: 20px; height: 100%">
              <div class="baseTitle">监督工作指令信息</div>
              <div class="publicForm" style="height: 350px; overflow-y: auto">
                <publicForm
                  ref="publicForm"
                  lableWidth="110px"
                  :formObj="FromShow"
                  :formData="formData"
                  :timestamp="formData.fFileurl"
                  :fileList="fSourcefileList"
                  @selectChange="selectChange"
                  @inputChange="inputChange"
                  @inputFocus="inputFocus"
                >
                </publicForm>
              </div>

              <div class="baseTitle">
                {{ putAwayCon1 }}
              </div>

              <div class="publicForm" style="height: 70px; overflow-y: auto">
                <publicForm
                  ref="publicForm1"
                  lableWidth="110px"
                  :formObj="putAway1"
                  :formData="formData"
                  @selectChange="selectChange"
                  @inputChange="inputChange"
                >
                </publicForm>
              </div>

              <!-- <div class="baseTitle" v-if="signFor == 2">
                {{ putAwayCon2 }}
              </div>
              <div
                class="publicForm"
                style="height: 70px; overflow-y: auto"
                v-if="signFor == 2"
              >
                <publicForm
                  ref="publicForm2"
                  lableWidth="110px"
                  :formObj="putAway2"
                  :formData="formData"
                  @selectChange="selectChange"
                  @inputChange="inputChange"
                >
                </publicForm>
              </div> -->

              <div class="baseTitle" v-if="signFor == 1 || signFor == 2">
                {{ review1 }}
              </div>
              <div
                class="publicForm"
                style="height: 100px; overflow-y: auto"
                v-if="signFor == 1 || signFor == 2"
              >
                <publicForm
                  ref="publicForm3"
                  lableWidth="110px"
                  :formObj="ReviewShow1"
                  :formData="formData"
                  :timestamp="formData.fRecheckfile1"
                  :fileList="fRecheckfile1list"
                  @selectChange="selectChange"
                  @inputChange="inputChange"
                  @delteFile="delteFile1"
                  @inputFocus="inputFocus"
                >
                </publicForm>
              </div>

              <!-- <div class="baseTitle" v-if="signFor == 2">
                {{ review2 }}
              </div>
              <div
                class="publicForm"
                style="height: 100px; overflow-y: auto"
                v-if="signFor == 2"
              >
                <publicForm
                  ref="publicForm4"
                  lableWidth="110px"
                  :formObj="ReviewShow2"
                  :formData="formData"
                  :timestamp="formData.fRecheckfile2"
                  :fileList="fRecheckfile2list"
                  @selectChange="selectChange"
                  @inputChange="inputChange"
                  @delteFile="delteFile2"
                  @inputFocus="inputFocus"
                >
                </publicForm>
              </div> -->

              <div style="height: 50px"></div>
            </div>
          </div>
          <div class="newlyAdded_btn" v-if="btnShow">
            <el-button
              type="primary"
              @click="yj_saveForm('受检单位1复查情况')"
              v-if="Sign == '复核' && signFor == 1"
            >
              保存
            </el-button>
            <el-button
              type="primary"
              @click="yj_saveForm('受检单位2复查情况')"
              v-if="Sign == '复核' && signFor == 2"
            >
              保存
            </el-button>

            <el-button type="warning" @click="dialogEditVisible = false">
              关闭
            </el-button>
          </div>
        </el-dialog>
      </div>
    </div>
  </div>
</template>
<script>
import {
  getWorkOrderExecutionReport2PageLists, //列表
  getWorkOrderExecutionReport2ByFid, //详情
  saveWorkOrderExecutionReport2ByRecheck1, //复核（单位1）
  // saveWorkOrderExecutionReport2ByRecheck2, //复核（单位2）
  commitWorkOrderExecutionReport2ByRecheck1, //提交1
  // commitWorkOrderExecutionReport2ByRecheck2, //提交2
} from "@/api/request.js";
import TableData from "@/components/HntManage/el-tables"; //主页面列表
import Pagination from "@/components/public/el-pagination"; //主页面分页
import publicForm from "@/components/public/el-form.vue"; //弹框form
import formJs from "../regexDetail.js"; //新增弹框配置项
// import tree from "@/components/public/el-trees"; //左侧机构树

export default {
  // inject: ["reload"],
  name: "executeText",
  data() {
    return {
      name: "executeText",
      // 分页
      navigatepageNums: null, //是否显示分页
      queryCriteriaData: {},
      // 分页
      yj_check: null,
      yj_submit: null,

      radio: "待办",

      // 列表
      getList: {
        fCompanyid: "", // 左侧选中组织机构id
        page: 1, //页码
        pageSize: 20, //每页条数
        userId: "", // 查询待办或已办时传 列表页查询不传
        modelType: "3", // 0-待办 1-已办 传2 表示列表页查询 复查编辑页：待办3   已办4
        fQualitygridclass: "", // 上方查询条件质量网格
        fQualitygridtype: "", // 上方查询条件工程网格
      },
      fId: null, //当前行数据fId
      row: { fstatus: "" }, //选中行
      loading: false, //列表转载
      table_config: formJs.table_config,
      tableData: [], //表格列表数据列表
      // 列表

      // 弹框
      Sign: "",
      timeYMD: null, //当前日期
      btnShow: true,
      dialogTitle: "",
      loadingEditDialog: false, //弹框loading
      dialogEditVisible: false, //新增弹框是否显示
      FromShow: formJs.FromShowLook1, //下发
      FromShowLook1: formJs.FromShowLook1, //下发---查看
      // FromShowLook2: formJs.FromShowLook2, //下发(2受检单位）---查看
      putAwayCon1: "受检单位1签收",
      putAway1: formJs.putAwayLook1, //签收
      // putAwayCon2: "受检单位2签收",
      // putAway2: formJs.putAwayLook2, //签收

      review1: "受检单位1复查情况",
      ReviewShow1: formJs.ReviewShowText1, //复查
      ReviewShowText1: formJs.ReviewShowText1, //编辑
      ReviewShowLook1: formJs.ReviewShowLook1, //查看
      // review2: "受检单位2复查情况",
      // ReviewShow2: formJs.ReviewShowText2, //复查
      // ReviewShowText2: formJs.ReviewShowText2, //编辑
      // ReviewShowLook2: formJs.ReviewShowLook2, //查看
      signFor: null, //判断复查展示

      formData: formJs.formData,
      recordfiles1: [], //删除文件
      recordfiles2: [], //删除文件
      fSourcefileList: [], //指令信息相关资料
      fRecheckfile1list: [], //复查相关资料1
      fRecheckfile2list: [], //复查相关资料2
      saveData: {},

      // 弹框

      userInfo: {}, //登录用户
    };
  },
  components: {
    TableData, //主页面列表
    Pagination, //分页
    publicForm, //表单
  },
  created() {},
  mounted() {
    this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
    // console.log("userInfo", this.userInfo);
    this.getList = {
      fCompanyid: this.userInfo.companyId, // 左侧选中组织机构id
      userId: this.userInfo.userId, // 查询待办或已办时传 列表页查询不传
      page: 1, //页码
      pageSize: 20, //每页条数
      modelType: "3", // 0代办 1已办 不传或传空 表示列表页查询
      fQualitygridclass: "", // 上方查询条件质量网格
      fQualitygridtype: "", // 上方查询条件工程网格
    };

    this.getData();
    this.yj_searchForm(this.getList);
    this.btnRole(this.name);

    this.table_config.operation.cols = [
      {
        prop: "fstatus",
        type: "primary",
        handleRow: this.handleRow,
      },
    ];
    this.table_config.operation["specialClass"] = function (rowData) {
      var color = null;
      if (rowData == "待签收") {
        color = "red !important";
      } else if (rowData == "执行中") {
        color = "orange !important";
      } else if (rowData == "已结束") {
        color = "green !important";
      } else {
        color = "#409eff !important";
      }
      return color;
    };
  },
  methods: {
    btnRole(name) {
      var btnList = [];
      var ModuleList = JSON.parse(sessionStorage.getItem("ModuleList"));
      if (ModuleList.length > 0) {
        ModuleList.map((item) => {
          if (item.fEncode == name) {
            btnList = item.modulebuttonList;
          }
        });
        var btnStr = [];
        btnList.map((item) => {
          btnStr.push(item.fEncode);
        });

        this.yj_check = btnStr.includes("yj_check");
        this.yj_submit = btnStr.includes("yj_submit");
      } else {
        this.yj_check = true;
        this.yj_submit = true;
      }
    },
    modelType(e) {
      this.fId = "";
      if (e == "待办") {
        this.getList.modelType = "3";
        this.getList.userId = this.userInfo.userId;
      } else {
        this.getList.modelType = "4";
        this.getList.userId = this.userInfo.userId;
      }
      this.yj_searchForm(this.getList);
    },
    // 获取列表数据
    yj_searchForm(id) {
      this.row = { fstatus: "" }; //选中行
      this.loading = true;
      getWorkOrderExecutionReport2PageLists(id)
        .then((res) => {
          if (res.errcode == 0) {
            var that = this;
            that.loading = false;
            that.tableData = res.data.pageInfo.list;
            that.queryCriteriaData = res.data.pageInfo;
            that.navigatepageNums =
              that.queryCriteriaData.navigatepageNums.length;
          } else {
            this.$message.error("列表", res.msg);
            this.loading = false;
          }
        })
        .catch(() => {
          this.loading = false;
        });
    },
    // 新增/编辑/签收
    edit(title) {
      this.ReviewShow1 = this.ReviewShowText1;
      // this.ReviewShow2 = this.ReviewShowText2;
      this.Sign = title;
      this.dialogTitle = title;
      this.recordfiles1 = [];
      this.recordfiles2 = [];
      this.fSourcefileList = [];
      this.fRecheckfile1list = []; //复查相关资料1
      this.fRecheckfile2list = []; //复查相关资料2
      this.btnShow = true;
      if (this.fId == "" || this.fId == null) {
        this.$message.error("请先选择需要复核的数据");
      } else {
        if (this.row.fstatus == "执行中") {
          this.loadingEditDialog = true; //弹框loading
          this.dialogEditVisible = true;
          this.getConcrete(this.fId);
        } else {
          this.$message.error("请选择信息状态为‘执行中’的数据");
        }
      }
    },
    // 获取详情
    getConcrete(id) {
      getWorkOrderExecutionReport2ByFid({ fId: id })
        .then((res) => {
          if (res.errcode == 0) {
            this.loadingEditDialog = false; //弹框loading
            this.formData = res.data.yjQmpMsWrokorderExecutionreport2;
            this.fSourcefileList = res.data.fFileurllist; //工作指令资料附件
            this.fRecheckfile1list = res.data.fRecheckfile1list; //复查相关资料1
            // this.fRecheckfile2list = res.data.fRecheckfile2list; //复查相关资料2
            // 判断监督工作指令信息展示
            // if (
            //   this.formData.fCheckunit2 != "" &&
            //   this.formData.fCheckunit2 != null
            // ) {
            //   this.FromShow = this.FromShowLook2;
            //   this.putAwayCon1 = "受检单位1签收";
            //   this.putAwayCon2 = "受检单位2签收";
            //   this.signFor = 2;
            // } else {
            //   this.FromShow = this.FromShowLook1;
            //   this.putAwayCon1 = "受检单位签收";
              // this.signFor = 1;
            // }
            // 判断是第几个复查单位
            if (this.userInfo.userId == this.formData.fSubsignid1) {
              this.signFor = 1;
              this.review1 = "受检单位复查情况";

              //复查资料1
              if (
                this.formData.fRecheckfile1 == "" ||
                this.formData.fRecheckfile1 == null
              ) {
                var fRecheckfile1 = "GZZLZXBGFC1" + new Date().valueOf();
                this.formData.fRecheckfile1 = fRecheckfile1;
              }
              // 复查人1
              if (
                this.formData.fRecheckid1 == "" ||
                this.formData.fRecheckid1 == null ||
                this.formData.fRecheckname1 == "" ||
                this.formData.fRecheckname1 == null
              ) {
                this.formData.fRecheckname1 = this.userInfo.realName;
                this.formData.fRecheckid1 = this.userInfo.userId;
              }
              // 复查时间1
              if (
                this.formData.fRecheckdate1s == "" ||
                this.formData.fRecheckdate1s == null
              ) {
                this.formData.fRecheckdate1s = this.timeYMD;
              }
            }
            // if (this.userInfo.userId == this.formData.fSubsignid2) {
            //   this.signFor = 2;
            //   this.review2 = "受检单位复查情况";
            //   //复查资料2
            //   if (
            //     this.formData.fRecheckfile2 == "" ||
            //     this.formData.fRecheckfile2 == null
            //   ) {
            //     var fRecheckfile2 = "GZZLZXBGFC1" + new Date().valueOf();
            //     this.formData.fRecheckfile2 = fRecheckfile2;
            //   }
            //   // 复查人2
            //   if (
            //     this.formData.fRecheckid2 == "" ||
            //     this.formData.fRecheckid2 == null ||
            //     this.formData.fRecheckname2 == "" ||
            //     this.formData.fRecheckname2 == null
            //   ) {
            //     this.formData.fRecheckname2 = this.userInfo.realName;
            //     this.formData.fRecheckid2 = this.userInfo.userId;
            //   }
            //   // 复查时间2
            //   if (
            //     this.formData.fRecheckdate2s == "" ||
            //     this.formData.fRecheckdate2s == null
            //   ) {
            //     this.formData.fRecheckdate2s = this.timeYMD;
            //   }
            // }
          } else {
            this.loadingEditDialog = false; //弹框loading
            return this.$message.error(res.msg);
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },

    // 保存
    yj_saveForm(num) {
      if (num == "受检单位1复查情况") {
        if (this.$refs.publicForm3.submitForm()) {
          if (this.fRecheckfile1list.length != 0) {
            var saveData1 = {
              fId: this.formData.fId, //当前fid
              fRecheckresult1: this.formData.fRecheckresult1, //受检单位1 复查结果
              fFilenumber1: this.formData.fFilenumber1, //受检单位1 富察问卷说明
              fRecheckdescription1: this.formData.fRecheckdescription1, //受检单位1  复查情况说明
              fRecheckfile1: this.formData.fRecheckfile1, //受检单位1 复查相关资料
              fRecheckid1: this.formData.fRecheckid1, //受检单位1 复查人id
              fRecheckname1: this.formData.fRecheckname1, //受检单位1 复查人姓名
              fRecheckdate1s: this.formData.fRecheckdate1s, //受检单位1 复查完成时间
              recordfiles: this.recordfiles1, //删除文件id集合
            };
            saveWorkOrderExecutionReport2ByRecheck1(saveData1)
              .then((res) => {
                if (res.errcode == 0) {
                  this.yj_searchForm(this.getList);
                  this.dialogEditVisible = false;
                  this.$message.success("复核成功");
                } else {
                  this.$message.error(res.msg);
                  console.log("签收接口报错");
                }
              })
              .catch((error) => {
                console.log(error, "签收接口报错");
              });
          } else {
            return this.$message.warning("请上传复查相关资料");
          }
        } else {
          console.log("error");
        }
      } 
      // else if (num == "受检单位2复查情况") {
      //   if (this.$refs.publicForm4.submitForm()) {
      //     if (this.fRecheckfile2list.length != 0) {
      //       var saveData2 = {
      //         fId: this.formData.fId, //当前fid
      //         fRecheckresult2: this.formData.fRecheckresult2, //受检单位2 复查结果
      //         fFilenumber2: this.formData.fFilenumber2, //受检单位2 富察问卷说明
      //         fRecheckdescription2: this.formData.fRecheckdescription2, //受检单位2  复查情况说明
      //         fRecheckfile2: this.formData.fRecheckfile2, //受检单位2 复查相关资料
      //         fRecheckid2: this.formData.fRecheckid2, //受检单位2 复查人id
      //         fRecheckname2: this.formData.fRecheckname2, //受检单位2 复查人姓名
      //         fRecheckdate2s: this.formData.fRecheckdate2s, //受检单位2 复查完成时间
      //         recordfiles: this.recordfiles2, //删除文件id集合
      //       };
      //       saveWorkOrderExecutionReport2ByRecheck2(saveData2)
      //         .then((res) => {
      //           if (res.errcode == 0) {
      //             this.yj_searchForm(this.getList);
      //             this.dialogEditVisible = false;
      //             this.$message.success("复核成功");
      //           } else {
      //             this.$message.error(res.msg);
      //             console.log("签收接口报错");
      //           }
      //         })
      //         .catch((error) => {
      //           console.log(error, "签收接口报错");
      //         });
      //     } else {
      //       return this.$message.warning("请上传复查相关资料");
      //     }
      //   } else {
      //     console.log("error");
      //   }
      // }
    },
    // 提交
    SubmitText(id) {
      if (id != "" && id != null) {
        if (this.userInfo.userId == this.row.fSubsignid1) {
          if (this.row.fstatuss1 == "编辑中") {
            this.$confirm("是否继续提交?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
            })
              .then(() => {
                this.loading = true;
                commitWorkOrderExecutionReport2ByRecheck1({
                  fId: id,
                  userId: this.userInfo.userId,
                  userName: this.userInfo.realName,
                })
                  .then((res) => {
                    if (res.errcode == 0) {
                      this.loading = false;
                      this.yj_searchForm(this.getList);
                      this.$message.success("提交成功");
                    } else {
                      this.$message.error("提交失败", res.msg);
                      this.loading = false;
                    }
                  })
                  .catch(() => {
                    console.log("提交失败");
                    this.loading = false;
                  });
              })

              .catch(() => {
                this.$message("取消提交");
              });
          } else {
            return this.$message.error("本条数据未复核");
          }
        } 
        // else if (this.userInfo.userId == this.row.fSubsignid2) {
        //   if (this.row.fstatuss2 == "编辑中") {
        //     this.$confirm("是否继续提交?", "提示", {
        //       confirmButtonText: "确定",
        //       cancelButtonText: "取消",
        //       type: "warning",
        //     })
        //       .then(() => {
        //         this.loading = true;
        //         commitWorkOrderExecutionReport2ByRecheck2({
        //           fId: id,
        //           userId: this.userInfo.userId,
        //           userName: this.userInfo.realName,
        //         })
        //           .then((res) => {
        //             if (res.errcode == 0) {
        //               this.loading = false;
        //               this.yj_searchForm(this.getList);
        //               this.$message.success("提交成功");
        //             } else {
        //               this.$message.error("提交失败", res.msg);
        //               this.loading = false;
        //             }
        //           })
        //           .catch(() => {
        //             console.log("提交失败");
        //             this.loading = false;
        //           });
        //       })

        //       .catch(() => {
        //         this.$message("取消提交");
        //       });
        //   } else {
        //     return this.$message.error("本条数据未复核");
        //   }
        // }
      } else {
        return this.$message.error("请先选择需要提交的数据");
      }
    },

    // 点击查看
    yj_viewForm(row, label) {
      this.row = row;
      this.fId = row.fId;
      if (label == "下发指令单位") {
        this.editText(this.fId);
      }
    },
    // 查看
    editText(id) {
      this.ReviewShow1 = this.ReviewShowLook1;
      // this.ReviewShow2 = this.ReviewShowLook2;

      this.dialogTitle = "查看";
      this.Sign = "查看";
      this.btnShow = false;
      if (id != "" && id != null) {
        this.loadingEditDialog = true; //弹框loading
        this.dialogEditVisible = true;
        getWorkOrderExecutionReport2ByFid({ fId: id })
          .then((res) => {
            if (res.errcode == 0) {
              var that = this;
              // if (
              //   res.data.yjQmpMsWrokorderExecutionreport2.fCheckunit2 != "" &&
              //   res.data.yjQmpMsWrokorderExecutionreport2.fCheckunit2 != null
              // ) {
              //   that.FromShow = that.FromShowLook2;
              //   this.putAwayCon1 = "受检单位1签收";
              //   this.putAwayCon2 = "受检单位2签收";
              //   this.review1 = "受检单位1复查情况";
              //   this.review2 = "受检单位2复查情况";
              //   this.signFor = 2;
              // } else {
                this.FromShow = this.FromShowLook1;
                this.putAwayCon1 = "受检单位签收";
                this.review1 = "受检单位复查情况";
                this.signFor = 1;
              // }

              that.loadingEditDialog = false;

              this.fSourcefileList = res.data.fFileurllist; //工作指令资料附件
              this.fRecheckfile1list = res.data.fRecheckfile1list; //复查相关资料1
              // this.fRecheckfile2list = res.data.fRecheckfile2list; //复查相关资料2
              that.formData = res.data.yjQmpMsWrokorderExecutionreport2;
            } else {
              this.$message.error("查看", res.msg);
              this.loadingEditDialog = false;
            }
          })
          .catch(() => {
            console.log("查看---详情接口报错");
            this.loadingEditDialog = false;
          });
      } else {
        return this.$message.error("请先选择需要查看的数据");
      }
    },
    getData() {
      var time = new Date();
      const y = time.getFullYear();
      const m = (time.getMonth() + 1 + "").padStart(2, "0");
      const d = (time.getDate() + "").padStart(2, "0");
      this.timeYMD = `${y}-${m}-${d}`;
    },
    // 点击当前
    rowChange(val) {
      this.row = val;
      this.fId = val.fId;
    },

    // 刪除
    delteFile1(file) {
      for (let index = 0; index < this.fRecheckfile1list.length; index++) {
        if (file.uid == this.fRecheckfile1list[index].uid) {
          if (this.fRecheckfile1list[index].atta == undefined) {
            this.recordfiles1.push({
              fId: this.fRecheckfile1list[index].fId,
            });
          } else {
            this.recordfiles1.push({
              fId: this.fRecheckfile1list[index].atta.fId,
            });
          }
          this.fRecheckfile1list.splice(index, 1);
        }
      }
    },
    delteFile2(file) {
      for (let index = 0; index < this.fRecheckfile2list.length; index++) {
        if (file.uid == this.fRecheckfile2list[index].uid) {
          if (this.fRecheckfile2list[index].atta == undefined) {
            this.recordfiles2.push({
              fId: this.fRecheckfile2list[index].fId,
            });
          } else {
            this.recordfiles2.push({
              fId: this.fRecheckfile2list[index].atta.fId,
            });
          }
          this.fRecheckfile2list.splice(index, 1);
        }
      }
    },
    inputChange(value, index, prop) {
      // console.log("inputChange", value, index, prop);
      return value, index, prop;
    },
    inputFocus(index, prop) {
      // console.log("inputFocus", index, prop);
      this.propText = prop;
      return index, prop;
    },
    selectChange(value, index, prop) {
      // console.log("selectChange", value, index, prop);
      return value, index, prop;
    },

    // 多选方法
    selectionChange() {},
    // 排序方法
    sortChange() {},
  },
};
</script>

<style scoped lang="less">
.printTables {
  background: #fff;
  display: flex;
  justify-content: end;
  padding: 5px;
  margin-top: 10px;
}

.dialogBody {
  padding: 3px 20px;
  height: 80%;
  overflow-y: auto;
}

.baseTitle {
  /* border: 1px solid #0c204d; */
  border-bottom: 1px solid #0c204d;
  height: 30px;
  line-height: 30px;
  position: relative;
  padding-left: 15px;
}

.baseTitle::after {
  display: block;
  content: "";
  height: 30px;
  width: 5px;
  position: absolute;
  left: 0;
  top: 0;
  background: #0c204d;
}
/* 弹框 */
.publicForm {
  display: flex;
}
.publicForm .mouldForm /deep/ .el-form-item__content {
  margin-left: 120px !important;
}
.publicFormBox {
  width: 50%;
  height: 100%;
}
.closure /deep/ .el-input__suffix {
  left: 91%;
}

/* 树选人 */
.addMemberCheckBox /deep/ .el-tree {
  overflow: hidden;
}
.addMemberCheckBox {
  display: flex;

  .addMemberCheckTree {
    width: 30%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(221, 221, 221, 1);
    box-sizing: border-box;

    .companyBox {
      height: 70%;
      box-sizing: border-box;
      overflow-y: auto;
    }

    .departmentBox {
      height: 30%;
      border-top: 0.5px solid rgba(221, 221, 221, 1);
      /* border: 1px solid red; */
      display: flex;
      flex-wrap: wrap;
      align-content: flex-start;
      overflow: hidden;
      overflow-y: auto;

      .departmentTitle {
        width: 77px;
        text-align: center;
        height: 40px;
        margin: 5px;
        // border: 1px solid green;
        border-radius: 8px;
        background: #d4daea;
        overflow: hidden;

        a {
          width: 100%;
          height: 100%;
          display: block;
          text-decoration: none;
        }
      }
    }
  }

  .selectMemberLeft {
    display: flex;
    align-items: center;
  }

  .addMemberCheckLeft {
    width: 70%;
    padding: 0 0 0 20px;
    border-top: 1px solid rgba(221, 221, 221, 1);
    border-bottom: 1px solid rgba(221, 221, 221, 1);
    border-right: 1px solid rgba(221, 221, 221, 1);

    .addMemberCheck {
      width: 150px;
      height: 64px;
      border-radius: 2px;
      display: flex;
      align-items: center;
      position: absolute;
      top: 0;
      left: 0;
    }
  }
  .addMemberCheckLefts {
    width: 52%;
  }
}

.newlyAdded_btns {
  height: 8%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.addMemberCheck .MemberIcon {
  height: 62px;
  width: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(241, 241, 241, 1);
}

.MemberIcon img {
  width: 37.81px;
  height: 39.38px;
  border-radius: 50%;
}

.MemberDetailInfos {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;

  .name {
    color: rgba(51, 51, 51, 1);
    font-size: 12px;
    height: 20px;
    line-height: 20px;
  }

  .hostName {
    color: rgba(128, 125, 125, 1);
    font-size: 12px;
    height: 20px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.MemberIcon .name {
  color: rgba(51, 51, 51, 1);
  font-size: 12px;
  height: 20px;
  line-height: 20px;
}

.MemberIcon .hostName {
  color: rgba(128, 125, 125, 1);
  font-size: 12px;
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activetext {
  color: rgba(197, 227, 255, 1);
  background: #2b5a9d;
}
// 多选人
.addMemberCheckBox .selectPerson {
  width: 18%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(221, 221, 221, 1);
  margin-left: 15px;
  box-sizing: border-box;

  .selectPersonTitle {
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(241, 241, 241, 1);
    border-bottom: 1px solid rgba(221, 221, 221, 1);
    color: rgba(128, 125, 125, 1);
    font-size: 12px;
  }

  .selectPersonData {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;

    .selectPersonDataBox {
      width: 165px;
      height: 72px;
      border-radius: 2px;
      border: 1px solid rgba(222, 222, 222, 1);
      margin: 8px 0;
      display: flex;
      position: relative;

      .MemberIcon {
        height: 100%;
        width: 64px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 8px;
        background: rgba(241, 241, 241, 1);

        img {
          width: 37.81px;
          height: 39.38px;
          border-radius: 50%;
        }
      }

      .MemberDetailInfo1 {
        position: relative;
        flex: 1;
        height: 100%;
        padding: 14px 0;
        overflow: hidden;

        .name {
          color: rgba(51, 51, 51, 1);
          font-size: 12px;
          height: 20px;
          line-height: 5px;
          white-space: nowrap;
        }

        .hostName {
          color: rgba(128, 125, 125, 1);
          font-size: 12px;
          height: 20px;
          line-height: 10px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
    }
  }
}
.MemberDetailInfo::after {
  position: absolute;
  width: 30px;
  height: 30px;
  display: block;
  background: url("../../../../assets/img/organization/yes.png") no-repeat;
  background-size: 100% 100%;
  right: 0;
  top: 0;
}

.deleteUser {
  position: absolute;
  width: 22px;
  height: 22px;
  display: block;
  background: url("../../../../assets/img/organization/no.png") no-repeat;
  background-size: 100% 100%;
  right: 0;
  top: 0;
}
// 多选人

.samllDialogs {
  display: flex;
  margin: 0 20px;
  padding-top: 50px;
  .treeModule {
    flex: 1;
  }
}

.addMemberCheckLeft /deep/ .el-radio-button {
  display: inline-block;
  width: 150px;
  height: 64px;
  position: relative;
  margin: 8px;
  border-radius: 2px;
  overflow: hidden;
  /* border: 1px solid rgba(222, 222, 222, 1); */
}

.addMemberCheckLeft /deep/ .el-radio-button__inner {
  border: 1px solid rgba(222, 222, 222, 1);
  border-radius: 2px;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
}

.addMemberCheckLeft /deep/ .el-radio-group {
  flex-wrap: wrap;
  font-size: 0;
  display: flex;
  /* flex-direction: column; */
}
/* 树选人 */
// 树弹框
#department1 /deep/ .el-dialog {
  width: 600px !important;
}
// 树弹框

/* 弹框 */
</style>